package empty.power;

import java.io.Serializable;
import java.util.Objects;

public class Power implements Serializable {
    private int id;
    private int user_id;
    private int file_id;

    private String file_qx;


    public Power() {
    }

    public Power(int id, int user_id, int file_id,String file_qx) {
        this.id = id;
        this.user_id = user_id;
        this.file_id = file_id;
        this.file_qx = file_qx;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public int getFile_id() {
        return file_id;
    }

    public void setFile_id(int file_id) {
        this.file_id = file_id;
    }



    public String getFile_qx() {
        return file_qx;
    }

    public void setFile_qx(String file_qx) {
        this.file_qx = file_qx;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Power power = (Power) o;
        return id == power.id && user_id == power.user_id && file_id == power.file_id && Objects.equals(file_qx, power.file_qx);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, user_id, file_id, file_qx);
    }

    @Override
    public String toString() {
        return "Power{" +
                "id=" + id +
                ", user_id=" + user_id +
                ", file_id=" + file_id +
                ", file_qx='" + file_qx + '\'' +
                '}';
    }

    public Object [] toArray(){
        return new Object[]{
                id,user_id,file_id,file_qx
        };
    }

}
